@ant-tree: ant-tree;

.@{ant-tree} {
  position: relative;
  li {
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--font-sub);
  }
  .ant-tree-node-content-wrapper > * {
    position: relative;
  }
  li span.ant-tree-switcher {
    z-index: 1;
  }
  li span.ant-tree-checkbox {
    z-index: 1;
  }
  .ant-tree-child-tree > li:first-child {
    padding-top: 0;
  }
  li .ant-tree-node-content-wrapper {
    height: 36px;
    display: flex;
    align-items: center;
  }
  li .ant-tree-node-content-wrapper.ant-tree-node-selected,
  li .ant-tree-node-content-wrapper:hover,
  li .ant-tree-node-content-wrapper {
    background-color: transparent;
  }
  .ant-tree-node-content-wrapper:hover::before {
    background-color: var(--primary-fade-10);
  }
  .ant-tree-node-content-wrapper::before {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    height: auto;
    transition: all 0.3s;
    z-index: 0;
  }
  .ant-tree-node-selected.ant-tree-node-content-wrapper::before {
    background-color: var(--primary-fade-20);
  }
  .ant-tree-title {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ant-tree-switcher {
    color: #999999;
  }

  li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon,
  li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon {
    font-size: 16px;
    color: #999999;
  }
}

.@{ant-tree} {
  ul li,
  li ul {
    width: 100%;
  }
}

.x-tree-select-selection:hover {
  .x-tree-select-selection-clear + .x-tree-select-selection__down {
    display: none;
  }
}
